<!DOCTYPE html>
<html lang="en" ng-app="account">
<head>
    <meta charset="UTF-8">
    <title>mall管理</title>
    <script src="../lib/jquery/jquery.min.js"></script>
    <script src="../js/common.js"></script>
    <script src="../lib/angular/angular.js"></script>
    <!---->
    <script src="../lib/font/iconfont.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../lib/adminui/web-icons/web-icons.css"/>
    <script src="../lib/laydate/laydate.js" type="text/javascript"></script>
    <link href="../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/ligerUI/skins/Gray2014/css/all.css" rel="stylesheet" type="text/css"/>
    <script src="../lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
    <script src="../lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
    <!--css-->
    <link rel="stylesheet" href="../css/site.css"/>
    <link rel="stylesheet" href="../css/leftmenu.css"/>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/nav.css">
</head>
<body ng-controller="accountCtrl" onunload="logout()">
<div id="left">
    <div style="width: 100%;height:100%;overflow-y: auto">
        <ul class="site-menu" style="padding-bottom: 50%">
            <li class="site-menu-item" ng-click="logout()">
                <a class="menu title">
                    <span>退出登录</span>
                </a>
            </li>
        </ul>
    </div>
</div>
<div id="right" style="overflow: hidden;">
    <div class="mall">
        <div class="page-container container-fluid">
            <div class="row">
                <div class="panel-body">
                    <ul id="myTab" class="nav nav-tabs" style="cursor: pointer;">
                        <li class="active" onclick="tabclick(this,'userinfo')" data-toggle="tab">
                            <a class="page-title">账户详情</a>
                        </li>
                        <li class="" onclick="tabclick(this,'eleinfo')" data-toggle="tab">
                            <a class="page-title">设备详情</a>
                        </li>
                        <li class="" onclick="tabclick(this,'malldetail')" data-toggle="tab">
                            <a class="page-title">门店体验详情</a>
                        </li>
                        <li class="" onclick="tabclick(this,'employee')" data-toggle="tab">
                            <a class="page-title">雇员</a>
                        </li>
                        <li class="" onclick="tabclick(this,'order')" data-toggle="tab">
                            <a class="page-title">订单</a>
                        </li>
                    </ul>
                    <div id="myTabContent" class="tab-content" style="padding-top: 20px;padding-left: 50px;">
                        <div class="tab-pane fade in active" id='userinfo'>
                            <ul class="lists list-group list-group-dividered list-group-full ullist">
                                <li class="list-group-item"><label class="label1">姓名：</label>
                                    <span ng-bind="malldata.name?malldata.name:'--'"></span>
                                </li>
                                <li class="list-group-item"><label class="label1">账户：</label>
                                    <span ng-bind="malldata.account?malldata.account:'--'"></span>
                                </li>
                                <li class="list-group-item"><label class="label1">电话：</label>
                                    <span ng-bind="malldata.phone?malldata.phone:'--'"></span></li>
                                <li class="list-group-item"><label class="label1">省：</label>
                                    <span ng-bind="malldata.province?malldata.province:'--'"></span></li>
                                <li class="list-group-item"><label class="label1">市：</label>
                                    {{malldata.city?malldata.city:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">区县：</label>
                                    {{malldata.district?malldata.district:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">乡镇：</label>
                                    {{malldata.town?malldata.town:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">村：</label>
                                    {{malldata.village?malldata.village:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">街道：</label>
                                    {{malldata.street?malldata.street:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">详细地址：</label>
                                    {{malldata.address?malldata.address:"--"}}
                                </li>
                                <li class="list-group-item"><label class="label1">密码管理：</label>
                                    <a href="javascript:void(0);" ng-click="editpassword()">修改密码</a>
                                </li>
                            </ul>
                        </div>
                        <div class="tab-pane fade" id='eleinfo'>
                            <ul class="lists list-group list-group-dividered list-group-full ullist">
                                <li class="list-group-item"><label class="label1">设备数量：</label>
                                    {{malldata.device_number_limit}}
                                </li>
                                <li class="list-group-item" style="overflow: hidden;">
                                    <label class="label1" style="float: left;">设备信息：</label>
                                    <span ng-if="!malldata.devices.length">--</span>
                                    <table class="devicesTable" ng-if="malldata.devices.length">
                                        <thead>
                                        <tr>
                                            <th></th>
                                            <th>设备名</th>
                                            <th>设备编号</th>
                                            <th>经销商编号</th>
                                            <th>设备类型</th>
                                            <th>加入时间</th>
                                            <th>设备MAC</th>
                                        </tr>
                                        </thead>
                                        <tbody style="max-height: 200px;overflow-y: scroll;">
                                        <tr ng-repeat="row in malldata.devices">
                                            <td>{{$index+1}}</td>
                                            <td>{{row.name}}</td>
                                            <td>{{row.id}}</td>
                                            <td>{{row.mall_id}}</td>
                                            <td>{{row.model}}</td>
                                            <td>{{row.web_bind_timestamp}}</td>
                                            <td>{{row.device_unique_id}}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </li>
                            </ul>
                        </div>
                        <div class="tab-pane fade" id='malldetail'>
                            <div class="l-loading" id="pageloading2"></div>
                            <div class="modaldevices"
                                 style="display: block;position: absolute;z-index: 91000;top: 55%;left: 47%"
                                 id="zwsj2">
                                暂无数据
                            </div>
                            <div id="maingrid2"></div>
                        </div>
                        <div class="tab-pane fade" id='employee'>
                            <div class="l-loading" id="pageloading3"></div>
                            <div class="modaldevices"
                                 style="display: block;position: absolute;z-index: 91000;top: 55%;left: 47%"
                                 id="zwsj3">
                                暂无数据
                            </div>
                            <div id="maingrid3"></div>
                        </div>
                        <div class="tab-pane fade" id='order'>
                            <div class="row" style="padding: 10px 15px;">
                                <div style="padding: 0;float: right;margin-left: 10px;">
                                    <button class="btn btn-dj btn-outline" onclick="searchOrderInfor()">搜索</button>
                                </div>
                                <div class="col-sm-2" style="padding: 0;float: right;">
                                    <div class="col-sm-4" style="text-align: center;vertical-align: middle;">雇员名:</div>
                                    <div class="col-sm-8">
                                        <input id="employer_name" type="text" class="form-control" name="employer_name"
                                               placeholder="输入雇员名" autocomplete="off"></div>

                                </div>
                                <div class="col-sm-2" style="padding: 0;float: right;">
                                    <div class="col-sm-4" style="text-align: center;vertical-align: middle;">用户名:</div>
                                    <div class="col-sm-8">
                                        <input id="user_name" type="text" class="form-control" name="user_name"
                                               placeholder="输入用户名" autocomplete="off"></div>
                                </div>
                                <div class="col-sm-2" style="padding: 0;float: right;">
                                    <input type="text" id="end_time"/>
                                </div>
                                <div class="col-sm-2" style="padding: 0;float: right;">
                                    <input type="text" id="start_time"/>
                                </div>
                            </div>
                            <div class="l-loading" id="pageloading4"></div>
                            <div class="modaldevices"
                                 style="display: block;position: absolute;z-index: 91000;top: 55%;left: 47%"
                                 id="zwsj4">
                                暂无数据
                            </div>
                            <div id="maingrid4"></div>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="modal" class="modal fade in" aria-hidden="false" aria-labelledby="examplePositionTop" role="dialog"
     tabindex="-1"
     style="display: none;background-color: rgba(0, 0, 0, 0.5);">
    <div class="modal-dialog modal-top">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="关闭" onclick="closebackmsg()">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">修改密码</h4>
            </div>
            <div class="modal-body">
                <ul>
                    <li class="list-group-item pasw">
                        <label>旧密码：</label>
                        <div class="input-group">
                            <input id="oldpw" ng-model="oldpw" type="password" class="form-control" name="password"
                                   placeholder="输入旧密码"
                                   data-fv-field="password" autofocus>
                            <span class="input-group-addon" onclick="showpass(this)">
										<span class="icon wb-eye-close" aria-hidden="true"></span>
									</span>
                        </div>
                    </li>
                    <li class="list-group-item pasw">
                        <label>新密码：</label>
                        <div class="input-group">
                            <input id="newpw" ng-model="newpw" type="password" class="form-control" name="password"
                                   placeholder="输入新密码"
                                   data-fv-field="password">
                            <span class="input-group-addon" onclick="showpass(this)">
										<span class="icon wb-eye-close" aria-hidden="true"></span>
									</span>
                        </div>
                    </li>
                </ul>
            </div>
            <div id="footer" class="modal-footer">
                <button type="button" class="btn btn-dj" data-dismiss="modal" ng-click="savepassword()">确认修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="closebackmsg()">取消</button>
            </div>
        </div>
    </div>
</div>
<div id="modal1" class="modal fade in" aria-hidden="false" aria-labelledby="examplePositionTop" role="dialog"
     tabindex="-1" style="display: none;background-color: rgba(0, 0, 0, 0.5);">
    <div class="modal-dialog modal-top">
        <div class="modal-content">
            <div class="modal-header">
                <button ng-if="aginload==''" type="button" class="close" data-dismiss="modal" aria-label="关闭"
                        onclick="closebackmsg()">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <h4 class="modal-title" id="content"></h4>
            </div>
            <div class="modal-footer">
                <button ng-if="aginload=='2'" type="button" class="btn btn-dj" data-dismiss="modal"
                        ng-click="loadagain()">确定
                </button>
                <button ng-if="aginload==''" type="button" class="btn btn-dj" data-dismiss="modal"
                        onclick="closebackmsg()">确定
                </button>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="modaldetails" style="display:none;">
    <div class="modal-dialog" style="width: 900px;">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #f5f5f5;">
                <span data-dismiss="modal" class="close" onclick="malltab2.canceldetailmodal()">&times;</span>
                <h5 class="title modal-title">门店体验详情</h5>
            </div>
            <div class="modal-body" style="height: 500px;overflow-y: scroll;">
                <div class="form-group">
                    <ul class="lists list-group list-group-dividered list-group-full ullist">
                        <li class="list-group-item">
                            <label class="label1">用户数量:</label>
                            <span>{{deviceObj.user_number}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠得分:</label>
                            <span>{{deviceObj.sleep_score_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠得分建议:</label>
                            <span>{{deviceObj.sleep_score_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">性别:</label>
                            <span ng-if="deviceObj.gender_value==0">男</span>
                            <span ng-if="deviceObj.gender_value==1">女</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">性别建议:</label>
                            <span>{{deviceObj.gender_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">年龄:</label>
                            <span>{{deviceObj.age_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">年龄建议:</label>
                            <span>{{deviceObj.age_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">身高:</label>
                            <span>{{deviceObj.height_value}}cm</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">身高建议:</label>
                            <span>{{deviceObj.height_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体重:</label>
                            <span>{{deviceObj.weight_value}}kg</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体重建议:</label>
                            <span>{{deviceObj.weight_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">bmi指数:</label>
                            <span>{{deviceObj.bmi_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">bmi指数建议:</label>
                            <span>{{deviceObj.bmi_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">怀孕状态:</label>
                            <span ng-if="deviceObj.pregnant_value==0">备孕</span>
                            <span ng-if="deviceObj.pregnant_value==1">怀孕</span>
                            <span ng-if="deviceObj.pregnant_value==2">产后2年</span>
                            <span ng-if="deviceObj.pregnant_value==3">无</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">怀孕状态建议:</label>
                            <span>{{deviceObj.pregnant_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体质:</label>
                            <span>{{deviceObj.corporeity_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体质建议:</label>
                            <span>{{deviceObj.corporeity_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">曾用床垫硬度:</label>
                            <span ng-if="deviceObj.used_mattress_hardness==0">偏软</span>
                            <span ng-if="deviceObj.used_mattress_hardness==1">适中</span>
                            <span ng-if="deviceObj.used_mattress_hardness==2">偏硬</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">推荐床垫硬度:</label>
                            <span ng-if="deviceObj.recommended_mattress_hardness==0">偏软</span>
                            <span ng-if="deviceObj.recommended_mattress_hardness==1">适中</span>
                            <span ng-if="deviceObj.recommended_mattress_hardness==2">偏硬</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">床垫硬度建议:</label>
                            <span>{{deviceObj.mattress_hardness_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">腰椎状态:</label>
                            <span ng-if="deviceObj.recommended_mattress_hardness==0">健康</span>
                            <span ng-if="deviceObj.recommended_mattress_hardness==1">亚健康</span>
                            <span ng-if="deviceObj.recommended_mattress_hardness==2">不健康</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">腰椎状态建议:</label>
                            <span>{{deviceObj.lumbar_status_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">床垫小结:</label>
                            <span>{{deviceObj.mattress_and_lumbar_info_summary}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体重差:</label>
                            <span>{{deviceObj.weight_gap_value}}kg</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">体重差建议:</label>
                            <span>{{deviceObj.weight_gap_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠时间差:</label>
                            <span>{{deviceObj.sleep_time_gap_value}}H</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">自身入睡时间:</label>
                            <span>{{deviceObj.self_on_bed_time}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">自身起床时间:</label>
                            <span>{{deviceObj.self_off_bed_time}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡伴入睡时间:</label>
                            <span>{{deviceObj.mate_on_bed_time}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡伴起床时间:</label>
                            <span>{{deviceObj.mate_off_bed_time}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠时间差建议:</label>
                            <span>{{deviceObj.sleep_time_gap_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡伴建议:</label>
                            <span>{{deviceObj.sleep_mate_info_summary}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡姿:</label>
                            <span ng-if="deviceObj.sleep_posture_value==0">左侧</span>
                            <span ng-if="deviceObj.sleep_posture_value==1">右侧</span>
                            <span ng-if="deviceObj.sleep_posture_value==2">平躺</span>
                            <span ng-if="deviceObj.sleep_posture_value==3">趴着</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡姿建议:</label>
                            <span>{{deviceObj.sleep_posture_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠时长:</label>
                            <span>{{deviceObj.sleep_duration_value}}H</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡眠时长建议:</label>
                            <span>{{deviceObj.sleep_duration_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">睡伴睡眠时长:</label>
                            <span>{{deviceObj.mate_sleep_duration_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">入睡时间:</label>
                            <span>{{deviceObj.fall_sleep_time_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">入睡时间建议:</label>
                            <span>{{deviceObj.fall_sleep_time_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">打鼾指数:</label>
                            <span>{{deviceObj.snore_rate_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">打鼾指数建议:</label>
                            <span>{{deviceObj.snore_rate_suggestion}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">psqi得分:</label>
                            <span>{{deviceObj.psqi_value}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">psqi得分建议:</label>
                            <span>{{deviceObj.psqi_suggestion}}</span>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="footer modal-footer" style="padding: 10px 15px 10px;">
                <button class="btn btn-primary" onclick="malltab2.canceldetailmodal()">确定</button>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="modalphone" style="display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #f5f5f5;">
                <span data-dismiss="modal" class="close" onclick="getphone.cancelfun()">&times;</span>
                <h5 class="title modal-title">提示</h5>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <div id="contentphone"></div>
                    <!--<p>最多获取电话次数：</p>-->
                    <!--<p>已经获取电话次数：<span>{{getphonedata}}</span></p>-->
                    <!--<p>电话号码：<span>{{getphonedata}}</span></p>-->
                </div>
            </div>
            <div class="footer modal-footer" style="padding: 10px 15px 10px;">
                <input class="btn btn-primary" type="button" value="确定" ng-disabled="okbtn"
                       onclick="getphone.okphone()"/>
                <input class="btn btn-default" type="button" value="取消" onclick="getphone.cancelfun()"/>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="modalmsg" style="display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #f5f5f5;">
                <span data-dismiss="modal" class="close" onclick="closebackmsg()">&times;</span>
                <h5 class="title modal-title">提示</h5>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h5 id="contentmsg"></h5>
                </div>
            </div>
            <div class="footer modal-footer" style="padding: 10px 15px 10px;">
                <input class="btn btn-primary" type="button" value="确定" onclick="closebackmsg()"/>
            </div>
        </div>
    </div>
</div>
<!-- 编辑-->
<div class="modal" id="editmodaldetails" style="display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #f5f5f5;">
                <span data-dismiss="modal" class="close" onclick="editadmin.cancelfun()">&times;</span>
                <h5 class="title modal-title">门店体验详情</h5>
            </div>
            <div class="modal-body" style="overflow-y: scroll;">
                <div class="form-group">
                    <ul class="lists list-group list-group-dividered list-group-full ullist">
                        <li class="list-group-item">
                            <label class="label1">订单ID:</label>
                            <span>{{editdata.id}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">门店名称:</label>
                            <span>{{editdata.mall_name}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">用户名称:</label>
                            <span>{{editdata.user_name}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">订单下单雇员名:</label>
                            <span>{{editdata.mall_employer_name}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">recommend_report_id:</label>
                            <span>{{editdata.recommend_report_id}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">邮寄地址:</label>
                            <span>{{editdata.deliver_address}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">下单时间:</label>
                            <span>{{editdata.create_timestamp}}</span>
                        </li>
                        <li class="list-group-item">
                            <label class="label1">状态更新时间:</label>
                            <span>{{editdata.update_timestamp}}</span>
                        </li>
                    </ul>
                    <div style="margin-top:-16px;">
                        <label class="label1">订单状态:</label>
                        <!--订单状态选择-->
                        <select id="orderstatus">
                            <option value="">=请选择状态=</option>
                        </select>
                    </div>
                </div>

            </div>
            <div class="footer modal-footer" style="padding: 10px 15px 10px;">
                <input class="btn btn-primary" type="button" value="确定" onclick="editadmin.okfun()"/>
                <button class="btn btn-default" onclick="editadmin.cancelfun()">取消</button>
            </div>
        </div>
    </div>
</div>
<div class="modal" id="editmodalresult" style="display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #f5f5f5;">
                <span data-dismiss="modal" class="close" onclick="editadmin.closebackmsg()">&times;</span>
                <h5 class="title modal-title">提示</h5>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h5 id="editmodalcontent"></h5>
                </div>
            </div>
            <div class="footer modal-footer" style="padding: 10px 15px 10px;">
                <input class="btn btn-primary" type="button" value="确定" onclick="editadmin.closebackmsg()"/>
            </div>
        </div>
    </div>
</div>
<script src="../js/mall.js"></script>
</body>
</html>
